<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var b1 = true;
    var b2 = false;
    var r1 = b1 + 0;
    var r2 = b2 + 0;
    console.log(r1,r2);

    var u1 = undefined;
    var r3 = Number(u1);
    console.log(r3);

    var n1 = null;
    var r4 = Number(null);
    console.log(r4);

    var str1 = "123";
    var str2 = "abc123";
    var r5 = parseInt(str1);
    var r6 = parseInt(str2)
    console.log(r5,r6);
</script>
</html>